import pytest
from loguru import logger

from api.api_plat_user import User

PLAT_USER = User()
data: list = [1, 2, 3]

@pytest.fixture(scope='session', autouse=True)
def init_db():
    logger.info('初始化数据库')

@pytest.fixture(autouse=True)
def decollator():
    logger.info(f'{"=" * 20}{"开始执行用例"}{"=" * 20}')
    yield
    logger.info(f'{"=" * 20}{"用例执行结束"}{"=" * 20}')
    # setup / teardown

@pytest.fixture()
def case_data():
    return "123456"

# 数据驱动
@pytest.fixture(params=data)
def data_inner(request):
    return request.param